import request from "@/utils/request";

//用户数据表接口
export const api_users = (data) => request.get('users', data);

//修改用户状态
export const api_state = ({ uId, type }) => request.put(`users/${uId}/state/${type}`);

//添加用户
export const api_save = (data) => request.post('users', data);

//编辑用户
export const api_search = (url, data) => request.put(url, data);

//修改用户
export const api_updusers=(url)=>request.delete(url)

//分配用户角色
export const api_updrole = (url,data) => request.put(url,data);

//获取角色列表
export const api_roles = (data) => request.get('roles', data);